<script src="../xpresso/html/js/XUpload/XUpload.js"></script>

<% if (request.getAttribute("uploadComplete") == null){ %>
<div id="mainxuploaddiv">
	<form action="image.upload" method="post" enctype="multipart/form-data" name="xupload" id="xupload">
		<div id="uploadDiv">
			
				<div id="UploadText"><%=uploadText%></div>
				<div id="UploadField"><input id="NewFile" name="NewFile" class="uploadField" type="file"></div>
				<div id="UploadDescription">
				<%=uploadDescription%>
				</div>	
		</div>
	
		<div id="imageWeb">
			<div id="WebImageText">
				<%=webImageText%>
			</div>
			<div id="WebImageInput">
				<%=webImageInputText%> <input name="WebImage" id="WebImage" type="text">
			</div>
			<div id="WebImageDescription">
				<%=webImageDescription%>
			</div>				
		</div>
		
		<div id="uploadProgressDiv" style="visibility:hidden">
			<%=uploadInProgress%>
		</div>
		
		<div id="uploadSubmit">
			<input type="hidden" name="ThumbWidth" value="">
			<input type="hidden" name="ThumbHeight" value="">
			<input type="hidden" name="ThumbQuality" value="">
			<input id="btnUpload" type="button" value="<%=submitText%>" onClick="uploadImage()">
		</div>
	</form>
</div>
<% } else { 
	String imageUrl = (String)request.getAttribute("imageUrl"); %>
	<script language="javascript">
		window.opener.changeFile('<%=imageUrl%>');
		window.close();
	
	</script>

<% } %>